<template>
  <header>
    <div class="search-return" @click="goBack">
      <i class="iconfont icon-weibiaoti--"></i>
    </div>
    <div class="search" @click="goSearch">
      <i class="iconfont icon-fangdajing"></i>
      <span>搜你喜欢的...</span>
    </div>
    <div class="home" @click="goHome">
      <i class=""></i>
    </div>
  </header>
</template>
  
  <script>
export default {
  name: "Header",
  methods: {
    goBack() {
      this.$router.back();
    },
    goSearch() {
      this.$router.push("/search");
    },
    goHome() {
      this.$router.push("/home");
    },
  },
};
</script>
  
<style scoped lang="scss">
header {
  display: flex;
  justify-content: space-around;
  align-items: center;
  width: 100%;
  height: 1.173333rem;
  background: #b0352f;
  color: #ffffff;
}

.search-return {
  padding: 0 0.266666rem;
  i {
    height: 0.8rem;
    font-size: 0.7rem;
    line-height: 1.173333rem;
    text-align: center;
  }
}

.search {
  display: flex;
  flex: 1;
  align-items: center;
  width: 6rem;
  height: 0.8rem;
  background-color: #ffffff;
  border-radius: 12px;
  i {
    padding: 0 0.16rem;
    font-size: 0.5rem;
    color: #ccc;
  }
  span {
    color: #ccc;
    font-size: 0.37rem;
  }
}

.home {
  padding: 0 0.266666rem;
  i {
    color: #ffffff;
    font-size: 0.7rem;
  }
}
</style>